package mil.af.amc.adpetracker.model.comparators;

import mil.af.amc.adpetracker.model.EquipmentItem;

import java.util.Comparator;

/**
 * Compare names of manufacturers for EquipmentItems
 *
 * @author TSgt Jason Ferguson
 */

public class EquipmentItemManufacturerComparator implements Comparator<EquipmentItem> {

    public int compare(EquipmentItem o1, EquipmentItem o2) {

        return o1.getItemModel().getManufacturer().getName().toUpperCase()
                .compareTo(o2.getItemModel().getManufacturer().getName().toUpperCase());

    }
}
